#ifndef GFFREADER_H
#define GFFREADER_H

#include <QObject>
#include <QString>
#include <QDebug>
#include <QFile>
#include <QDir>
#include <QApplication>
#include <QThread>
#include <QPointer>
#include <QStringList>

#include "genomeelementdatapacket.h"


class GffReader : public QObject
{
    Q_OBJECT

    friend class ProprietaryGffReader;

public:
    explicit GffReader(QString gffFileName, QObject *parent = 0);
    
signals:
    /** trackProgress(int stepsComplete) signal.
      * This signal, if caught by a parent class, communicates how much of the upload and processing is complete
      * @param int stepsComplete, stores a value out of 100
      */
    void trackProgress(int stepsComplete);

    /** finished()
      * This signal communicates the end of the data processing
      */
    void finished();

    /** error(QString err)
      * This signal passes along errors to a parent class.
      */
    void error( QString err );

    void dataPacketGenerated( GenomeElementDataPacket* newDataPacket );

public slots:

    /** process() slot.
      * Begins data processing
      */
    void process();

protected:
    QString gffFileName;

    void processFirstColumnsInLine( QStringList line, QString& seqId, QString& source, QString& type, int& start, int& stop, bool& posStrand );
    
};

#endif // GFFREADER_H
